package model

import "time"

type Profile struct {
	ID          string     `gorm:"primaryKey;column:id" json:"id"`
	Name        string     `gorm:"column:name;type:varchar(255)" json:"name"`
	URL         string     `gorm:"column:url;type:text" json:"url"`
	Platform    string     `gorm:"column:platform;type:varchar(100)" json:"platform"`
	Type        string     `gorm:"column:type;type:varchar(100)" json:"type"`
	IsActive    bool       `gorm:"column:is_active;default:true" json:"is_active"`
	LastCrawled *time.Time `gorm:"column:last_crawled" json:"last_crawled"`
	VideoCount  int        `gorm:"column:video_count;default:0" json:"video_count"`
	Status      string     `gorm:"column:status;type:varchar(50);default:idle" json:"status"` 
	CreatedAt   time.Time  `gorm:"column:created_at;type:datetime" json:"created_at"`
	UpdatedAt   time.Time  `gorm:"column:updated_at;type:datetime" json:"updated_at"`
}

func (Profile) TableName() string {
	return "douyin_profiles"
}